<link type="text/css" rel="stylesheet" href="{url:#css/ucenter.css}" />
<div class="mt10 clearfix" style="position: relative;">
	{widget:name=sub_navs action=ucsidebar sidebar=$sidebar act=$actionId}
	<div class="clearfix uc-content" style="margin-left: 212px;">
		<div class="box p10">
			<h1 class="title"><span>{lang:MY_ORDER}：</span></h1>
			<div class="mt10">
				<div class="box list-item order-status">
					<div class="title"><b>{lang:ORDER_SN}：</b><i class="icon-order-{$order['type']}"></i>{$order['order_no']}<b>{lang:CREATE_ORDER_TIME}：</b>{$order['create_time']} <b>{lang:status}：</b>
						{echo:$this->order_status($order)}</div>
					<p>{$order['create_time']}&nbsp;&nbsp;<span class="black">{lang:CREATE_ORDER}</span></p>
                    {if:$order['pay_status']>0}
					<p>{$order['pay_time']}&nbsp;&nbsp;<span class="black">{lang:ORDER}{$order['order_no']} {lang:PAYMENT} {$currency_symbol}<b>{$order['order_amount']}</b></span></p>
                    {/if}
                    {if:$order['status']>=3}
                    <p><span class="black">{lang:ORDER}{$order['order_no']} {lang:HAS_BEEN_APPROVED}</span></p>
                    {/if}
                    {if:$order['delivery_status']>0}
					<p>{$order['send_time']}&nbsp;&nbsp;<span class="black">{lang:ORDER}<b class="orange">{lang:ALL_PRODUCTS}</b>{lang:HAS_BEEN_SHIPPING}</span></p>
                    {/if}
                    {if:$order['status']==4}
					<p>{$order['completion_time']}&nbsp;&nbsp;<span class="black">{lang:ORDER_FINISHED}</span></p>
                    {/if}
				</div>
				<div class="mt10">
					<table class="simple form">
						<tr>
							<th class="tl" style="padding-left: 20px;" colspan=2>{lang:CONSIGNEE_INFORMATION}：</th>
						</tr>
						<tr><td class="label">{lang:CONSIGNEE}：</td><td>{$order['accept_name']}</td></tr>
						<tr><td class="label">{lang:SHIPPING_ADDRESS}：</td><td>{$parse_area[$order['province']]} {$parse_area[$order['city']]} {$parse_area[$order['county']]} {$order['addr']}</td></tr>
						<tr><td class="label">{lang:PHONE_NUMBER}：</td><td>{$order['phone']}</td></tr>
						<tr><td class="label">{lang:TELEPHONE1}：</td><td>{$order['mobile']}</td></tr>
					</table>
				</div>
				<div class="mt10">
					<table class="simple form">
						<tr>
							<th class="tl" style="padding-left: 20px;" colspan=2>{lang:PAYMENT_AND_DELIVERY_METHODS}：</th>
						</tr>
						<tr><td class="label">{lang:PAYMENT_METHOD}：</td><td>{$order['pay_name']}</td></tr>
						<tr><td class="label">{lang:FREIGHT}：</td><td>{$order['real_freight']}</td></tr>
						{if:$order['delivery_status']>0}
						<tr><td class="label">{lang:SHIPPING_COMPANY}：</td><td>{$invoice['ec_name']}</td></tr>
						<tr><td class="label">{lang:SHIPPING_NUMBER}：</td><td>{$invoice['express_no']}&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-mini" href="http://www.kuaidi100.com/chaxun?com={$invoice['ec_code']}&nu={$invoice['express_no']}" target="_blank">{lang:QUERY_LOGISTICS}</a>
						</td></tr>
						{/if}
					</table>
				</div>
				{if:$order['is_invoice']==1}
				{set:$invoice = explode(':',$order['invoice_title'])}
				<div class="mt10">
					<table class="simple form">
						<tr>
							<th class="tl" style="padding-left: 20px;" colspan=2>{lang:ASK_FOR_BILL}：</th>
						</tr>
						<tr><td class="label">{lang:INVOICE_TYPE}：</td><td>{if:$invoice[0]==1}{lang:COMPANY}{else:}{lang:PERSONAL}{/if}</td></tr>
						<tr><td class="label">{lang:INVOICE_LOOK_UP}：</td><td>{$invoice[1]}</td></tr>
					</table>
				</div>
				{/if}
				<div class="mt10">
					<table class="simple form">
						<tr>
							<th></th><th>{lang:GOODS_NO}</th><th>{lang:GOODS_NAME}</th><th>{lang:SPECIFICATIONS}</th><th>{lang:goods_price}</th> <th>{lang:DISCOUNT_PRICE}</th> <th>{lang:NUMBER}</th> <th>{lang:SUBTOTAL}</th>
						</tr>
						{set:$total=0.00;$subtotal=0.00;}
						{list:items=$order_goods}
						{set:$subtotal = ($item['real_price']*$item['goods_nums']);$total+=$subtotal; $subtotal = sprintf ("%01.2f",$subtotal);}
						<tr><td><a href="{url:/index/product/id/$item[goods_id]}" target="_blank"><img src="{echo:Common::thumb($item['img'],100,100);}" width="40"></a></td><td>{$item['pro_no']}</td> <td><a href="{url:/index/product/id/$item[goods_id]}" target="_blank">{$item['name']}</a>
						</td><td> {set:$specs = unserialize($item['spec'])}
						{if:!empty($specs)}
						{list:items=$specs item=$spec}
						{$spec['name']}：{$spec['value'][2]}
						{/list}
						{/if}</td><td>{$currency_symbol}{$item['goods_price']}</td> <td>{$currency_symbol}{$item['real_price']}</td> <td>{$item['goods_nums']}</td> <td>{$currency_symbol}{$subtotal}</td></tr>
						{/list}
					</table>
				</div>
				{set:$total = sprintf ("%01.2f",$total);}
				<div class="mt10 box p10 tr order-total">
					<div class="pb10">
						{if:$order['type']==3}
						<p>{lang:TOTAL_AMOUNT_OF_PACKAGES}：{$currency_symbol}{$order['real_amount']}</p>
						{else:}
						<p>{lang:TOTAL_AMOUNT_OF_GOODS}：{$currency_symbol}{$total}</p>
						{/if}
						<p>+ {lang:freight}：{$currency_symbol}{$order['real_freight']}</p>
						{if:$order['taxes']>0}
						<p>+ {lang:TAX}：{$currency_symbol}{$order['taxes']}</p>
						{/if}
						<p>- {lang:DISCOUNT}：{$currency_symbol}{$order['discount_amount']}</p>
						{if:$order['adjust_amount']!=0}
						<p>{if:$order['adjust_amount']>0}+{else:}-{/if} {lang:PRICE_ADJUSTMENT}：{$currency_symbol}{echo:trim($order['adjust_amount'],'-')}</p>
						<p>{lang:PRICE_ADJUSTMENT_REASON}：{$order['adjust_note']|'无原因'}</p>
						{/if}
					</div>
					<div class="t-line pt10 total">
						{lang:PAYMENT_AMOUNT}：<b>{$currency_symbol}{$order['order_amount']}</b>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	function order_sign(id) {
		$.post("{url:/ucenter/order_sign}",{id:id},function(data){
			if(data['status']=='success'){
				location.reload();
			}
		},'json');
	}
</script>
